feat: Native container serialization#2375
Merged
ShadauxCat merged 17 commits intodevelopfrom May 24, 2023
Merged
Conversation
…rSerializer, NetworkVariable, and RPCs.
0xFA11
reviewed
Jan 13, 2023
Comment on lines
+2140
to
+2147
| // This simplifies things - easier to call __createNativeList() and have the implementation in C# | ||
| // than to try to actually construct a NativeList in IL. This is also more future-proof. | ||
|
|
||
| // Unlike other types, NativeList<> calls ReadValueSafeInPlace instead of ReadValueSafe. | ||
| // FastBufferReader doesn't support a non-in-place deserializer for NativeList in order to | ||
| // avoid users using it without realizing the allocation overhead that would cost. In-place | ||
| // is more efficient when an existing value exists, and when it doesn't, it's easy to create one, | ||
| // which is what we do here. |
Contributor
There was a problem hiding this comment.
agreed — also thanks for the comment.
0xFA11
approved these changes
Jan 13, 2023
samlucas-unity
approved these changes
Mar 1, 2023
…native containers and managed types) that may be changed without setting the dirty flag.
samlucas-unity
approved these changes
Mar 8, 2023
samlucas-unity
approved these changes
Mar 8, 2023
…ion' into feat/native_container_serialization
# Conflicts: # com.unity.netcode.gameobjects/CHANGELOG.md # com.unity.netcode.gameobjects/Tests/Editor/Serialization/BaseFastBufferReaderWriterTest.cs # com.unity.netcode.gameobjects/Tests/Editor/Serialization/FastBufferReaderTests.cs # com.unity.netcode.gameobjects/Tests/Editor/Serialization/FastBufferWriterTests.cs # com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariableTests.cs # com.unity.netcode.gameobjects/Tests/Runtime/RpcTests.cs
…Also I forgot to check in the merge before starting this work, so... Merge branch 'develop' into feat/native_container_serialization # Conflicts: # com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs # com.unity.netcode.gameobjects/Editor/CodeGen/RuntimeAccessModifiersILPP.cs
NoelStephensUnity
approved these changes
May 23, 2023
Member
NoelStephensUnity
left a comment
There was a problem hiding this comment.
Looks good to me (a second time!) 😸
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support for native containers in FastBufferReader/Writer, BufferSerializer, NetworkVariable, and RPCs.
Changelog
Testing and Documentation